﻿using System;
using Castle.MicroKernel.Lifestyle;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
using DIBestPractice.Application.Log;
using NUnit.Framework;

namespace DIBestPractice.Tests
{
    public class UnitTestBase
    {
        protected IWindsorContainer Container { get; private set; }
        private IDisposable _scope;

        [SetUp]
        public void RegisterComponetsAndBeginScope()
        {
            Container = TestApplicationBootstrap.RegisterComponents();

            _scope = Container.BeginScope();
        }

        

        [TearDown]
        public void DisposeScope()
        {
            _scope.Dispose();
        }
    }
}